package com.gxg.entities;

import org.json.JSONObject;

import javax.persistence.Entity;
import javax.persistence.Id;
import java.sql.Timestamp;

/**
 * By 李朋飞
 **/
@Entity
public class Ptitle {
    @Id
    private int id;
    private String parentTitle;
    private String teacherId;
    private String parentImgWebUrl;
    private String parentImgLocalUrl;
    private String videoClass;
    private Timestamp createTime;
    private Timestamp modificationTime;

    public String getParentImgWebUrl() {
        return parentImgWebUrl;
    }

    public void setParentImgWebUrl(String parentImgWebUrl) {
        this.parentImgWebUrl = parentImgWebUrl;
    }

    public String getParentImgLocalUrl() {
        return parentImgLocalUrl;
    }

    public void setParentImgLocalUrl(String parentImgLocalUrl) {
        this.parentImgLocalUrl = parentImgLocalUrl;
    }

    public Ptitle(String parentTitle, String teacherId, String parentImgWebUrl, String parentImgLocalUrl, String videoClass, Timestamp createTime, Timestamp modificationTime) {
        this.parentTitle = parentTitle;
        this.teacherId = teacherId;
        this.parentImgWebUrl = parentImgWebUrl;
        this.parentImgLocalUrl = parentImgLocalUrl;
        this.videoClass = videoClass;
        this.createTime = createTime;
        this.modificationTime = modificationTime;
    }

    public String toString()
    {
        JSONObject jsonObject = new JSONObject();
        jsonObject.accumulate("parentTitle", this.parentTitle);
        jsonObject.accumulate("teacherId", this.teacherId);
        jsonObject.accumulate("parentImgWebUrl", this.parentImgWebUrl);
        jsonObject.accumulate("parentImgLocalUrl", this.parentImgLocalUrl);
        jsonObject.accumulate("videoClass", this.videoClass);
        jsonObject.accumulate("createTime", this.createTime);
        jsonObject.accumulate("modificationTime", this.modificationTime);
        return jsonObject.toString();
    }
    public Ptitle() {
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getParentTitle() {
        return parentTitle;
    }

    public void setParentTitle(String parentTitle) {
        this.parentTitle = parentTitle;
    }

    public String getTeacherId() {
        return teacherId;
    }

    public void setTeacherId(String teacherId) {
        this.teacherId = teacherId;
    }

    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

    public Timestamp getModificationTime() {
        return modificationTime;
    }

    public void setModificationTime(Timestamp modificationTime) {
        this.modificationTime = modificationTime;
    }

    public String getVideoClass() {
        return videoClass;
    }

    public void setVideoClass(String videoClass) {
        this.videoClass = videoClass;
    }
}
